﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ManageResources.aspx.cs" Inherits="FatFreeFitness._secured.management.ManageResources" masterpagefile="../../_layout/_master/AdminMaster.master" %>
<asp:Content id="Content1" runat="Server" contentplaceholderid="AdminContent">
    <asp:FormView ID="FormView1" runat="server" DataKeyNames="ID" 
        DataSourceID="EntityDsResources" DefaultMode="Insert" 
        oniteminserted="FormView1_ItemInserted" Width="482px">
        <EditItemTemplate>
            ID:
            <asp:Label ID="IDLabel1" runat="server" Text='<%# Eval("ID") %>' />
            <br />
            Name:
            <asp:TextBox ID="NameTextBox" runat="server" Text='<%# Bind("Name") %>' />
            <br />
            Description:
            <asp:TextBox ID="DescriptionTextBox" runat="server" 
                Text='<%# Bind("Description") %>' />
            <br />
            SingleUse:
            <asp:CheckBox ID="SingleUseCheckBox" runat="server" 
                Checked='<%# Bind("SingleUse") %>' />
            <br />
            TemplateSteps:
            <asp:TextBox ID="TemplateStepsTextBox" runat="server" 
                Text='<%# Bind("TemplateSteps") %>' />
            <br />
            <asp:LinkButton ID="UpdateButton" runat="server" CausesValidation="True" 
                CommandName="Update" Text="Update" />
            &nbsp;<asp:LinkButton ID="UpdateCancelButton" runat="server" 
                CausesValidation="False" CommandName="Cancel" Text="Cancel" />
        </EditItemTemplate>
        <InsertItemTemplate>
            Name:
            <asp:TextBox ID="NameTextBox" runat="server" Text='<%# Bind("Name") %>' />
            <br />
            Description:
            <asp:TextBox ID="DescriptionTextBox" runat="server" 
                Text='<%# Bind("Description") %>' />
            <br />
            SingleUse:
            <asp:CheckBox ID="SingleUseCheckBox" runat="server" 
                Checked='<%# Bind("SingleUse") %>' />
            <br />
            <br />
            <asp:LinkButton ID="InsertButton" runat="server" CausesValidation="True" 
                CommandName="Insert" Text="Insert" />
&nbsp;<asp:LinkButton ID="InsertCancelButton" runat="server" CausesValidation="False" 
                CommandName="Cancel" Text="Cancel" />
        </InsertItemTemplate>
        <ItemTemplate>
            ID:
            <asp:Label ID="IDLabel" runat="server" Text='<%# Eval("ID") %>' />
            <br />
            Name:
            <asp:Label ID="NameLabel" runat="server" Text='<%# Bind("Name") %>' />
            <br />
            Description:
            <asp:Label ID="DescriptionLabel" runat="server" 
                Text='<%# Bind("Description") %>' />
            <br />
            SingleUse:
            <asp:CheckBox ID="SingleUseCheckBox" runat="server" 
                Checked='<%# Bind("SingleUse") %>' Enabled="false" />
            <br />
            TemplateSteps:
            <asp:Label ID="TemplateStepsLabel" runat="server" 
                Text='<%# Bind("TemplateSteps") %>' />
            <br />
            <asp:LinkButton ID="EditButton" runat="server" CausesValidation="False" 
                CommandName="Edit" Text="Edit" />
            &nbsp;<asp:LinkButton ID="DeleteButton" runat="server" CausesValidation="False" 
                CommandName="Delete" Text="Delete" />
            &nbsp;<asp:LinkButton ID="NewButton" runat="server" CausesValidation="False" 
                CommandName="New" Text="New" />
        </ItemTemplate>
    </asp:FormView>
    <br />
    <div>
    
        <telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateDeleteColumn="True" 
            AutoGenerateEditColumn="True" CellSpacing="0" DataSourceID="EntityDsResources" 
            GridLines="None" onitemdatabound="RadGrid1_ItemDataBound">
<MasterTableView AutoGenerateColumns="False" DataKeyNames="ID" 
                DataSourceID="EntityDsResources">
<CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>

<RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column">
<HeaderStyle Width="20px"></HeaderStyle>
</RowIndicatorColumn>

<ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column">
<HeaderStyle Width="20px"></HeaderStyle>
</ExpandCollapseColumn>

    <Columns>
        <telerik:GridBoundColumn DataField="ID" DataType="System.Int32" 
            FilterControlAltText="Filter ID column" HeaderText="ID" ReadOnly="True" 
            SortExpression="ID" UniqueName="ID">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="Name" 
            FilterControlAltText="Filter Name column" HeaderText="Name" 
            SortExpression="Name" UniqueName="Name">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="Description" 
            FilterControlAltText="Filter Description column" HeaderText="Description" 
            SortExpression="Description" UniqueName="Description">
        </telerik:GridBoundColumn>
        <telerik:GridCheckBoxColumn DataField="SingleUse" DataType="System.Boolean" 
            FilterControlAltText="Filter SingleUse column" HeaderText="SingleUse" 
            SortExpression="SingleUse" UniqueName="SingleUse">
        </telerik:GridCheckBoxColumn>
    </Columns>

<EditFormSettings>
<EditColumn FilterControlAltText="Filter EditCommandColumn column"></EditColumn>
</EditFormSettings>
</MasterTableView>

<FilterMenu EnableImageSprites="False">
<WebServiceSettings>
<ODataSettings InitialContainerName=""></ODataSettings>
</WebServiceSettings>
</FilterMenu>

<HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default">
<WebServiceSettings>
<ODataSettings InitialContainerName=""></ODataSettings>
</WebServiceSettings>
</HeaderContextMenu>
        </telerik:RadGrid>
    
    </div>
    <asp:EntityDataSource ID="EntityDsResources" runat="server" 
        ConnectionString="name=FatFreeFitnessEntities" 
        DefaultContainerName="FatFreeFitnessEntities" EnableDelete="True" 
        EnableFlattening="False" EnableInsert="True" EnableUpdate="True" 
        EntitySetName="Resources">
    </asp:EntityDataSource>
    </asp:Content>
